package prototipo.server.logic.transaction;

import prototipo.server.logic.exception.ExceptionLogic;
import prototipo.server.logic.util.Money;

public abstract class Payment implements PaymentIF{

	private Money value;
	private boolean ok;

	public Payment(Money value, boolean ok) throws ExceptionLogic {
		super();
		this.setValue(value);
		this.setOK(ok);
	}

	public Money getValue() {
		return this.value;
	}

	public void setValue(Money value) throws ExceptionLogic {
		if (value == null)
			throw new ExceptionLogic("Valor vazio.", new Throwable(
					"Money is null."));
		this.value = value;
	}

	/**
	 * @return the finished
	 */
	public boolean isOK() {
		return ok;
	}

	/**
	 * @param finished
	 *            the finished to set
	 */
	public void setOK(boolean OK) {
		this.ok = OK;
	}

}
